]> dgit.raspbian.org Git - gnome-shell.git/commit
polkitAgent: Ensure cleanup if dialog wasn't shown
authorFlorian Müllner <fmuellner@gnome.org>
Tue, 9 Feb 2021 23:10:03 +0000 (00:10 +0100)
committerFlorian Müllner <fmuellner@gnome.org>
Thu, 11 Feb 2021 12:48:54 +0000 (13:48 +0100)
commit21faae480ed3a3794192864dab8ea006b1592c39
tree3f393e0f9b26bcad323951d618deb386212a5f65
parent9fcbf3d0f928a4ed818928bea639d517dcc5a49b
polkitAgent: Ensure cleanup if dialog wasn't shown

It is possible for an initiated session to complete without
a request if polkit can authenticate the action without user
input. We fail to clean up after ourselves in that case, as
the cleanup is done after the dialog is closed.

The dialog can still be shown when the code that hides existing
dialogs while the screen is locked shows it on unlock. But as
the session was closed, the dialog is now defunct and cannot
be dismissed by the user.

Fix this by running the cleanup on close() when the dialog
wasn't shown.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3701

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1662>
js/ui/components/polkitAgent.js